home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / cmsrc392.zip / CSCSPU.MF < prev    next >
Text File  |  1992-03-30  |  4KB  |  76 lines

  1. % This file puts characters into code positions \0020, \0021, and \0031
  2. % to take the place of dotless i, dotless j, and sharp s
  3. % in caps-and-small-caps fonts
  4.  
  5. cmchar "The letter I"; % in code position \0020
  6. beginchar(oct"020",max(6u#,4u#+cap_stem#),cap_height#,0);
  7. italcorr cap_height#*slant-.25u#;
  8. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  9. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  10. lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0;
  11. filldraw stroke z1e--z2e; % stem
  12. if serifs:
  13.  dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
  14.  dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
  15. math_fit(0,.5ic#); penlabels(1,2); endchar;
  16.  
  17. cmchar "The letter J"; % in code position \0021
  18. beginchar(oct"021",9u#,cap_height#,0);
  19. italcorr cap_height#*slant-cap_serif_fit#
  20.  +.75cap_jut#-2.5u#+min(.5cap_stem#,u#);
  21. adjust_fit(0,cap_serif_fit#);
  22. pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
  23. top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h;
  24. if serifs: pos3(vair,-90); pos4(cap_hair,-180);
  25.  pos5(flare+(cap_stem-stem),-180);
  26.  bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r;
  27.  filldraw stroke z1e--z2e&super_arc.e(2,3);  % stem and arc
  28.  dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut);  % serif
  29.  bulb(3,4,5);  % bulb
  30. else: filldraw stroke z1e--z2e;  % stem
  31.  pickup fine.nib; pos3(cap_stem',0); z3=z2;
  32.  pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100);
  33.  bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o;
  34.  filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal
  35. math_fit(0,.5ic#-.5u#); penlabels(1,2,3,4,5); endchar;
  36.  
  37. cmchar "Two letters S";
  38. beginchar(oct"031",10u#,cap_height#,0);
  39. italcorr cap_height#*slant-u#;
  40. adjust_fit(0,0);
  41. numeric theta; theta=90-angle(50u,h); slope:=-h/50u;  % angle at middle
  42. numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi;
  43. numeric ess'; ess'=max(fine.breadth,cap_ess);
  44. pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90);
  45. pos0(ess',theta); pos7(s_slab,-90);
  46. x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o;
  47. y0=.52h; lft x3l=hround u; rt x6r=hround(w-u);
  48. x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine;
  49. ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
  50. ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
  51. filldraw stroke super_arc.e(2,3) & z3e{down}
  52.  ..z4e---z5e..z6e{down} & super_arc.e(6,7);  % main stroke
  53. if serifs: pos1(hair,180); pos8(hair,180);
  54.  rt x1l=hround(w-1.5u); lft x8r=hround u;
  55.  bot y1=vround 2/3h+1; top y8=vround 1/3h-1;
  56.  filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e;  % upper arc
  57.  filldraw stroke z7e{left}....{up}z8e;  % lower arc
  58.  path upper_arc, lower_arc;
  59.  upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2;
  60.  lower_arc=z7{left}....{up}z8;
  61.  pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0);
  62.  x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r;
  63.  x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8;
  64.  numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1'));
  65.  filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle;  % upper barb
  66.  t:=xpart(lower_arc intersectiontimes(z9r--z8'));
  67.  filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle;  % lower barb
  68. else: pos1(1.2flare,-100); pos8(1.2flare,-100);
  69.  x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u;
  70.  top y1l=vround .93h+o; bot y8r=vround .1h-o;
  71.  filldraw stroke term.e(2,1,right,.9,4);  % upper arc and terminal
  72.  filldraw stroke term.e(7,8,left,1,4); fi  % lower arc and terminal
  73. r:=r+w+shrink_fit; charwd:=2charwd;
  74. addto currentpicture also currentpicture shifted (w+shrink_fit,0);
  75. penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar;
  76.